<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <script>
            const target = {
                foo: "xxx",
                bar: "yyy",
            };
            const proxy = new Proxy(target, {
                get(target, key, receiver) {
                    return Reflect.get(target, key, receiver);
                },
                set(target, key, value, receiver) {
                    console.log(key, value);
                    Reflect.set(target, key, value, receiver);
                },
                deleteProperty(target, key) {
                    return Reflect.deleteProperty(target, key)
                }
            });
            
        </script>
    </body>
</html>
